﻿namespace Methods
{
    using System;

    public class CertainNumberRepeatedTimes
    {
        // 1.1.9.04. Write a method that finds how many times certain number can be found in a given array.
        // Write a program to test that the method works correctly.

        public static byte CertainNumberCounter(sbyte certainNum, int[] arry)
        {
            byte counter = 0;
            for (int i = 0; i < arry.Length; i++)
            {
                if (arry[i] == certainNum)
                {
                    counter++;
                }
            }
            return counter;
        }
        static void Main()
        {
            while (true)
            {
                int[] arr = { 1, 2, 3, 4, 4, 4, 1, 3, 1, 4, 7, 8 }; // 4 -> 4 times

                Console.WriteLine(CertainNumberCounter(sbyte.Parse(Console.ReadLine()), arr));
            }
        }
    }
}